<%-- 
    Document   : header
    Created on : Feb 6, 2012, 3:25:48 PM
    Author     : PhucAn
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="util.SharingUtil"%>
<%@page import="dto.User"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Online Quiz</title>
        <link href="../style/admin_style.css" rel="stylesheet" type="text/css"/>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
        <link href="../style/dropdown-menu.css" rel="stylesheet" type="text/css"/>

        <script type="text/javascript" src="../script/dropdown-menu.js"></script>
    </head>
    <body>     
        <div id="wrapper">
            <div id="top-menu">
                <ul id="dropdown-menu-bar" class="dropdown-menu-bar">
                    <li><a href='../public/index.jsp'>Home </a></li>
                    <%
                        dto.User headeruser = SharingUtil.getUser(session);
                        request.setAttribute("user", headeruser);
                        if (SharingUtil.isUserLoggedIn(headeruser)) {

                    %>

                    <li>

                        <a href="../admin/index.jsp">${user.username}</a>

                        <ul>
                            <li>
                                <a href="../admin/index.jsp?pcontent=profile">Profile</a>
                            </li>
                            <li>
                                <a href="?pcontent=logout">Sign out</a>
                            </li>
                        </ul>
                    </li>
                    <%} else {%>                 
                    <li><a href="?pcontent=login">Login</a></li>                
                    <li><a href="?pcontent=register">Register</a></li>
                    <%}%>
                </ul>

            </div>
            <div id="banner">           
                <div id="logo"><img src="../images/logo.jpg" alt="logo"/></div>
                <div id="page-title">ONLINE QUIZ</div>
            </div>
    </body>
</html>
